* xselect.c (Fx_get_atom_name): Avoid need for strlen.
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 21 Jun 2011 02:16:54 +0000 (19:16 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 21 Jun 2011 02:16:54 +0000 (19:16 -0700)
src/ChangeLog
src/xselect.c

index a11ca6b1fbd938e994a1e3e7b9f1976a8ed06133..5e18195af4b187cac31bcdfce03f8d05fd914586 100644 (file)
@@ -1,5 +1,7 @@
 2011-06-21  Paul Eggert  <eggert@cs.ucla.edu>
 
+       * xselect.c (Fx_get_atom_name): Avoid need for strlen.
+
        * xrdb.c: Don't assume strlen fits in int; avoid some strlens.
        * xrdb.c (magic_file_p, search_magic_path):
        Omit last arg SUFFIX; it was always 0.  All callers changed.
index 5b01fc22a42e99b7fb4d5d364ed2ddb121f8d512..7f4e0b40f62c4e0f992ae42b01bf1c5c14610ee4 100644 (file)
@@ -2361,7 +2361,7 @@ If the value is 0 or the atom is not known, return the empty string.  */)
   x_uncatch_errors ();
 
   if (!had_errors)
-    ret = make_string (name, strlen (name));
+    ret = build_string (name);
 
   if (atom && name) XFree (name);
   if (NILP (ret)) ret = empty_unibyte_string;